<?php

namespace App;

use Illuminate\Support\Facades\Request;
use Input;
class ImportExcel extends \Maatwebsite\Excel\Files\ExcelFile
{
    public function getFile()
    {
        $path = storage_path('exports');
        $file = Input::file('report');
        if ($file->isValid())
        {
            $file_name = $file->getClientOriginalName();
            $file->move($path, $file_name);
            return $path . DIRECTORY_SEPARATOR . $file_name;
        } else {
            // TODO
        }
    }

    public function getFilters()
    {
        return ['chunk'];
    }
}
?>
